/*
 * mainwindow.h
 *
 *  Created on: 06.10.2014
 *      Author: Ralph
 */

#ifndef MAINWINDOW_H_
#define MAINWINDOW_H_

#include <QMainWindow>
#include <QSettings>

class QAction;
class QMenu;
class QToolBar;

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
	MainWindow( bool debug = false, bool resetSettings = false );
	virtual ~MainWindow();

	void closeEvent( QCloseEvent *event );

private:
	void loadSettings();
	void saveSettings();
	QVariant loadSetting( QSettings &settings, QString key );

	void createActions();
    void createMenus();
    void createToolBars();
    void createStatusBar();
    void createDockWindows();

	bool m_debug;
	QString m_workDir;

    QAction* newAct;
    QAction* openAct;
    QAction* saveAct;
    QAction* quitAct;
    QAction* aboutAct;
    QAction* separatorAct;

    QMenu* fileMenu;
    QMenu* helpMenu;

    QToolBar* fileToolBar;


private slots:
    void slotNew();
    void slotOpen();
    void slotSave();
    void slotAbout();
    void slotQuit();
};

#endif /* MAINWINDOW_H_ */
